<template>
    <h2>Home</h2>
</template>

<script lang="ts" setup name="Home">
import { onMounted, onUnmounted } from 'vue'
// 每次路由切换，都包含旧页面的卸载和新页面的挂载

onMounted(() => {
  console.log('home 挂载')
})

onUnmounted(() => {
    console.log('home 卸载')
})
</script>

<style>

</style>